<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    65. Valid Number
   </h1>
   <p>
    Validate if a given string can be interpreted as&nbsp;a decimal number.
   </p>
   <p>
    Some examples:
    <br>
    <code>
     "0"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " 0.1 "
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     "abc"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "1 a"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "2e10"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " -90e3&nbsp; &nbsp;"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " 1e"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "e3"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     " 6e-1"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " 99e2.5&nbsp;"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "53.5e93"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " --6 "
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "-+3"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "95a54e53"
    </code>
    =&gt;
    <code>
     false
    </code>
   </p>
   <p>
    <strong>
     Note:
    </strong>
    It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one. However, here is a list of characters that can be in a valid decimal number:
   </p>
   <ul>
    <li>
     Numbers 0-9
    </li>
    <li>
     Exponent - "e"
    </li>
    <li>
     Positive/negative sign - "+"/"-"
    </li>
    <li>
     Decimal point - "."
    </li>
   </ul>
   <p>
    Of course, the context of these characters also matters in the input.
   </p>
   <p>
    <strong>
     Update (2015-02-10):
    </strong>
    <br>
    The signature of the
    <code>
     C++
    </code>
    function had been updated. If you still see your function signature accepts a
    <code>
     const char *
    </code>
    argument, please click the reload button to reset your code definition.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    65. 有效数字
   </h1>
   <p>
    验证给定的字符串是否为数字。
   </p>
   <p>
    例如:
    <br>
    <code>
     "0"
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     " 0.1 "
    </code>
    =&gt;
    <code>
     true
    </code>
    <br>
    <code>
     "abc"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "1 a"
    </code>
    =&gt;
    <code>
     false
    </code>
    <br>
    <code>
     "2e10"
    </code>
    =&gt;
    <code>
     true
    </code>
   </p>
   <p>
    <strong>
     说明:
    </strong>
    &nbsp;我们有意将问题陈述地比较模糊。在实现代码之前，你应当事先思考所有可能的情况。
   </p>
   <p>
    <strong>
     更新于 2015-02-10:
    </strong>
    <br>
    <code>
     C++
    </code>
    函数的形式已经更新了。如果你仍然看见你的函数接收&nbsp;
    <code>
     const char *
    </code>
    类型的参数，请点击重载按钮重置你的代码。
   </p>
  </div>
 </body>
</html>